<form action="<?php echo url_for('usuario/' . ($form->getObject()->isNew() ? 'create' : 'update') . (!$form->getObject()->isNew() ? '?id=' . $form->getObject()->getId() : '')) ?>
      " method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>

    <?php if (!$form->getObject()->isNew()): ?>
        <input type="hidden" name="sf_method" value="put" />
    <?php endif; ?>

        <table>
            <tbody>
            <?php echo $form ?>
            </tbody>
            <tfoot>
                <tr>
                    <td>
                        &nbsp;
                        <a href="<?php echo url_for('usuario/index') ?>" <input type="button" value="Listar"> </a>
                    </td>
                    <td>
                        <input type="submit" value="Salvar" />
                    </td>
                    <td>
                        <?php if (!$form->getObject()->isNew()): ?>
                            &nbsp;
                        <?php echo link_to('Delete', 'usuario/delete?id=' . $form->getObject()->getId(), array('method' => 'delete', 'confirm' => 'Deseja Realmente apagar o registro?')) ?>
                        <?php endif; ?>
                    </td>
                </tr>
            </tfoot>
        </table>

</form>
